package com.levi.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.levi.mapper.OrderMapper;
import com.levi.pojo.Orders;
import com.levi.service.OrderService;
import org.springframework.stereotype.Service;

/**
 * @author shentong
 * @since 2022/6/12 11:47 AM
 */
@Service
public class OrderServiceImpl extends ServiceImpl<OrderMapper, Orders>
                            implements OrderService {

    @Override
    public boolean create(Integer productId, Integer count){
        Orders orders = new Orders();
        orders.setProductCount(count);
        orders.setProductId(productId);
        this.save(orders);
        return true;
    }
}
